improve: optimize Docker build for faster CI and smaller image#193
improve: optimize Docker build for faster CI and smaller image#193
Conversation
- Split base into build-base (build-essential, python3) and runtime-base (sqlite3, atlas, vim) so build tools are excluded from production image - Change GHA cache mode from min to max to cache all intermediate stages - Add opensrc/, .git/, .github/ to .dockerignore to reduce build context - Fix legacy ENV format warnings Image size: 1.40GB → 1.09GB (-22%) CI with cache: base stages cached, only rebuild on source changes (~30s) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Add .node-version (24.14.0) as source of truth for Node version - Add packageManager field (pnpm@10.32.1) to package.json - Bump Dockerfile ARGs to match: Node 24.12.0→24.14.0, pnpm 10.26.2→10.32.1 - Remove hardcoded version/node-version from CI workflow steps (pnpm/action-setup reads packageManager, setup-node reads .node-version) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
baseintobuild-base(build-essential, python3) andruntime-base(sqlite3, atlas, vim) — build tools excluded from production imagemode=min→mode=maxto cache all intermediate stages (base, deps, production-deps)opensrc/,.git/,.github/to.dockerignoreto reduce build contextENV key valueformat warningsImpact
pnpm build+ COPY layers need to rebuild on source changes (~30s vs ~2min)Test plan
docker buildsucceedsbetter-sqlite3,atlas,sqlite3all work in production image🤖 Generated with Claude Code